import { createApp } from "vue"
import "@/assets/css/reset.css"
import App from "./App.vue"
import router from "@/router/router"
import { createPinia } from "pinia"
import "@/assets/fonts/iconfont.css"
// Toast
import "vant/es/toast/style"
// Dialog
import "vant/es/dialog/style"
// Notify
import "vant/es/notify/style"
// ImagePreview
import "vant/es/image-preview/style"
const app = createApp(App)
const pinia = createPinia()
//定义全局过滤器
app.config.globalProperties.$filters = {
  prefix(url) {
    if (url && url.startsWith("http")) {
      return url
    } else {
      url = `http://backend-api-01.newbee.ltd${url}`
      return url
    }
  },
}
app.use(pinia)
app.use(router)
app.mount("#app")
